
import java.util.Scanner; // 放在程序的开头(类的的声明的前面)
public class Study6 { 
	public static void main (String[] args) {
		Scanner stdIn = new Scanner (System.in); // 放在 main 方法的开头（进行下面的读入的操作）
		/*对字符串stdIn.nextLine()的探究*/
		System.out.print("请输入：");
		String str = stdIn.nextLine(); // 获取键盘中的字符串
		System.out.println("输入的是："+str);
	}



	public static void main8 (String[] args) {
		Scanner stdIn = new Scanner (System.in); // 放在main 方法的开头（进行下面的读入的操作）
	   /*对字符串中的stdIn.next()的探究*/
	   System.out.print("请输入：");
	   String str = stdIn.next(); // 获取键盘中字符串
	   System.out.println("你输入的是："+str);

	}




	public static void main7 (String[] args) {
		Scanner stdIn = new Scanner (System.in);

		long num = stdIn.nextLong();
		System.out.print("请输入long类型的值： ");
		System.out.println("num= "+num);
	}




/*对通过键盘输入数据*/
public static void main6 (String[] args) {
	Scanner stdIn = new Scanner(System.in); // 放在main方法的开头（进行下面的读入的操作）

	boolean boolVariate = stdIn.nextBoolean();
	System.out.println("boolVariate= "+boolVariate);

	byte byteVariate = stdIn.nextByte();
	System.out.println("byteVariate= "+byteVariate);

	short shortVariate = stdIn.nextShort();
	System.out.println("shortVariate= "+shortVariate);

	int intVariate = stdIn.nextInt();
	System.out.println("intVariate= "+intVariate);

	long longVariate = stdIn.nextLong();
	System.out.println("longVariate= "+longVariate);

	float floatVariate = stdIn.nextFloat();
	System.out.println("floatVariate= "+floatVariate);

	double doubleVariate = stdIn.nextDouble();
	System.out.println("doubleVariate= "+doubleVariate);


}



	public static void main5 (String[] args) {
		/*取模(取余)得探究*/

		System.out.println("5%3="+5%3); // 2
		System.out.println("(-5)%3="+(-5)%3); // -2
		System.out.println("5%(-3)="+5%(-3)); // 2
		System.out.println("(-5)%(-3)="+(-5)%(-3)); //-2
	}




	/*除法的探究*/
	public static void main4 (String[] args) {

		System.out.println("5 / 3 = "+(5/3) ); // 1
		System.out.println("5 / -3 = "+5/(-3)); // -1
		System.out.println("(-5) / 3 = "+(-5)/3); // -1
		System.out.println("(-5) / (-3) = "+(-5)/(-3)); // 1
	} 




	public static void main3 (String[] args) {
		Scanner stdIn = new Scanner(System.in); // 放在main的方法的开头，进行读入操作的前面；
		int num = stdIn.nextInt(); // 获取通过键盘输入的整形值
		int num2 = stdIn.nextInt(); // 获取通过键盘输入的整型值，注意是 整形的其他的会

		System.out.println("num = "+num);
		System.out.println("num1 = "+num2);

	}





	/*课堂代码 */
	public static void main2 (String[] args) {
		double num = 3.14;
		float num2 = 3.14f;

		System.out.println("num2 == num");

		// 二次代码

		System.out.println("我是第一行\n我是第二行\r我才是第二行");
		System.out.println("我是第一行\n我才是第二行\r我是第二行");

		char c1 ='a';
		String c2 = "a";
		char c3 = '中';
		char c4 = '\u0061';
		// System.out.println(c1 == c2);
		System.out.println(c1);
		System.out.println(c2);
		System.out.println(c3);
		System.out.println(c4);

		String str = "你好世界";
		System.out.println("你好世界\"\"");



	}






	public static void main1 (String[] args) {
		Scanner stdIn = new Scanner (System.in);

		System.out.println("输入你需要的数字int 类型的：");
		int x = stdIn.nextInt(); // 注意这里识别的是 int 类型的k  
		System.out.println("x = "+x);


	}
}


/*探究键盘的输入*/
/*import java.util.Scanner;
public class Study6 {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner (System.in);
		System.out.println("对x和y进行加减乘除运算");

		System.out.print("x的值:");
		int x = stdIn.nextInt();

		System.out.print("y的值:");
		int y = stdIn.nextInt();

		System.out.println("x+y = "+ (x+y));
		System.out.println("x-y = "+ (x-y));
		System.out.println("x/y = "+ (x/y));
		System.out.println("x*y = "+ (x%y));

	}
}*/